import axios from '@/utils/request'
export const getProList = (obj) => {
  const { categoryId, goodsName, page } = obj
  return axios.get('http://smart-shop.itheima.net/index.php?s=/api/goods/list', {
    params: {
      categoryId,
      goodsName,
      page
    }

  }
  )
}

export const getProDetail = (goodsId) => {
  return axios.get('http://smart-shop.itheima.net/index.php?s=/api/goods/detail', {
    params: {
      goodsId
    }
  })
}

export const getProComment = (goodsId, limit) => {
  return axios.get('http://smart-shop.itheima.net/index.php?s=/api/comment/listRows', {
    params: {
      goodsId,
      limit
    }
  })
}
